package info.hexin.netty.test2;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by maczam on 2014/11/1.
 */
public class TcpClientHandler extends SimpleChannelInboundHandler<Object> {
    private static final Logger logger = LoggerFactory.getLogger(TcpClientHandler.class);

    @Override
    protected void messageReceived(ChannelHandlerContext ctx, Object msg) throws Exception {
        //messageReceived方法,名称很别扭，像是一个内部方法.
        logger.info("client接收到服务器返回的消息:" + msg);
    }
}
